package org.nerve.data.neo4j.domain.relation;

import org.neo4j.ogm.annotation.EndNode;
import org.neo4j.ogm.annotation.RelationshipEntity;
import org.neo4j.ogm.annotation.StartNode;
import org.nerve.data.neo4j.domain.Account;
import org.nerve.data.neo4j.domain.BaseEntity;

/**
 * org.nerve.data.neo4j.domain.relation
 * Created by zengxm on 12/13/2016.
 */
@RelationshipEntity(type="FRIEND")
public class Friend extends BaseEntity{
	@StartNode
	private Account from;
	@EndNode
	private Account to;

	public Friend(){}
	public Friend(Account from,Account to){
		this.from = from;
		this.to = to;
	}

	public Account getFrom() {
		return from;
	}

	public Friend setFrom(Account from) {
		this.from = from;
		return this;
	}

	public Account getTo() {
		return to;
	}

	public Friend setTo(Account to) {
		this.to = to;
		return this;
	}
}
